package com.wqh.springboot.bucket.mybatis.plus.service.impl;

import com.baomidou.dynamic.datasource.annotation.DS;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wqh.springboot.bucket.mybatis.plus.mapper.UserMapper;
import com.wqh.springboot.bucket.mybatis.plus.domain.User;
import com.wqh.springboot.bucket.mybatis.plus.service.UserService;
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService{

    @Override
    @DS(value = "master")
    public List<User> getUser1() {
        return baseMapper.selectList(null);
    }

    @Override
    @DS(value = "slave_1")
    public List<User> getUser2() {
        return baseMapper.selectList(null);
    }

    @Override
    @DS(value = "slave_2")
    public List<User> getUser3() {
        return baseMapper.selectList(null);
    }
}
